import RegexpAssets from "../../src/assets/regExp";
import DtoDecorator from "../../src/decorator/dtoDecorator";

/**性别 */
export class RegisterGender {
    /**男 */
    static male = 0;
    /**女 */
    static female = 1;
}

export class RegisterIn {
    @DtoDecorator.ApiParams("账号", "string", { rule: RegexpAssets.email })
    account: string;
    @DtoDecorator.ApiParams("密码", "string", { rule: RegexpAssets.pwd })
    password: string;
    @DtoDecorator.ApiParams("昵称", "string", { rule: RegexpAssets.nickname })
    nickname: string;
    @DtoDecorator.ApiParams("性别", { type: "enum", prop: RegisterGender })
    gender: RegisterGender;
}

export class LoginIn {
    @DtoDecorator.ApiParams("账号", "string", { rule: RegexpAssets.email })
    account: string;
    @DtoDecorator.ApiParams("密码", "string", { rule: RegexpAssets.pwd })
    password: string;
}

export class EditNicknameIn {
    @DtoDecorator.ApiParams("昵称", "string", { rule: RegexpAssets.nickname })
    nickname: string;
}